class GameField(dimension: Int) {
    private val adjacencyMatrix: ArrayList<Array<Int>>

    init {
        adjacencyMatrix = initAdjacencyMatrix(dimension)
        println("Game field created")
    }

    fun connectVertices(coordinates: Pair<Int, Int>) {
        adjacencyMatrix[coordinates.second][coordinates.first] = 1
    }

    fun isMoveValid(coordinates: Pair<Int, Int>) : Boolean {
        TODO("Check if move is valid")
    }

    private fun initAdjacencyMatrix(dimension: Int): ArrayList<Array<Int>> {
        val arrayListOf = arrayListOf<Array<Int>>()

        for (x in 0 until dimension) {
            arrayListOf.add(Array(dimension) { 0 })
        }

        return arrayListOf
    }

    fun printField() {
        adjacencyMatrix.forEach {
            it.forEach { v -> print(" $v") }
            println()
        }
    }
}